<?php

class matchmodel extends model{
public function matchlist(){
$sql="select m.teamone,t1.team as tm1,m.score,m.teamtwo,t2.team as tm2 from `match` as m
LEFT JOIN team as t1 ON m.teamone=t1.id
LEFT JOIN team as t2 ON m.teamtwo=t2.id";
return $this->db->query($sql);
}
} 


// var_dump($res);die;

 ?>